package com.ruoyi.movie.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.movie.mapper.MovieWeeklyVisitsMapper;
import com.ruoyi.movie.domain.MovieWeeklyVisits;
import com.ruoyi.movie.service.IMovieWeeklyVisitsService;

/**
 * 电影周访问量Service业务层处理
 *
 * @author ruoyi
 * @date 2025-10-28
 */
@Service
public class MovieWeeklyVisitsServiceImpl implements IMovieWeeklyVisitsService
{
    @Autowired
    private MovieWeeklyVisitsMapper movieWeeklyVisitsMapper;

    /**
     * 查询电影周访问量
     *
     * @param id 电影周访问量主键
     * @return 电影周访问量
     */
    @Override
    public MovieWeeklyVisits selectMovieWeeklyVisitsById(Integer id)
    {
        return movieWeeklyVisitsMapper.selectMovieWeeklyVisitsById(id);
    }

    /**
     * 查询电影周访问量列表
     *
     * @param movieWeeklyVisits 电影周访问量
     * @return 电影周访问量
     */
    @Override
    public List<MovieWeeklyVisits> selectMovieWeeklyVisitsList(MovieWeeklyVisits movieWeeklyVisits)
    {
        return movieWeeklyVisitsMapper.selectMovieWeeklyVisitsList(movieWeeklyVisits);
    }

    /**
     * 新增电影周访问量
     *
     * @param movieWeeklyVisits 电影周访问量
     * @return 结果
     */
    @Override
    public int insertMovieWeeklyVisits(MovieWeeklyVisits movieWeeklyVisits)
    {
        return movieWeeklyVisitsMapper.insertMovieWeeklyVisits(movieWeeklyVisits);
    }

    /**
     * 修改电影周访问量
     *
     * @param movieWeeklyVisits 电影周访问量
     * @return 结果
     */
    @Override
    public int updateMovieWeeklyVisits(MovieWeeklyVisits movieWeeklyVisits)
    {
        return movieWeeklyVisitsMapper.updateMovieWeeklyVisits(movieWeeklyVisits);
    }

    /**
     * 批量删除电影周访问量
     *
     * @param ids 需要删除的电影周访问量主键
     * @return 结果
     */
    @Override
    public int deleteMovieWeeklyVisitsByIds(Integer[] ids)
    {
        return movieWeeklyVisitsMapper.deleteMovieWeeklyVisitsByIds(ids);
    }

    /**
     * 删除电影周访问量信息
     *
     * @param id 电影周访问量主键
     * @return 结果
     */
    @Override
    public int deleteMovieWeeklyVisitsById(Integer id)
    {
        return movieWeeklyVisitsMapper.deleteMovieWeeklyVisitsById(id);
    }

    /**
     * 根据影视ID删除周访问量
     *
     * @param movieBasicsId 影视基础ID
     * @return 结果
     */
    @Override
    public int deleteMovieWeeklyVisitsByMovieBasicsId(Integer movieBasicsId)
    {
        return movieWeeklyVisitsMapper.deleteMovieWeeklyVisitsByMovieBasicsId(movieBasicsId);
    }

    /**
     * 根据影视ID查询周访问量列表
     *
     * @param movieBasicsId 影视基础ID
     * @return 电影周访问量集合
     */
    @Override
    public List<MovieWeeklyVisits> selectMovieWeeklyVisitsListByMovieBasicsId(Integer movieBasicsId)
    {
        return movieWeeklyVisitsMapper.selectMovieWeeklyVisitsListByMovieBasicsId(movieBasicsId);
    }
}
